package com.nsgf.library.data.bean;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

import java.util.List;

public class DisplacementBean implements Parcelable {

    private String id;
    private String monitorCode;
    private String testNum;
    private String time;
    private String testPoint;
    private float displacementN;
    private Object verticalSectionName;
    private Object projectCode;
    private float displacementE;
    private Object horizontalSectionName;
    private float displacement;
    private int isDelete;
    private String createTime;
    private Object sectionName;

    private List<DisplacementBean> beanList;

    public DisplacementBean() {
    }

    protected DisplacementBean(Parcel in) {
        id = in.readString();
        monitorCode = in.readString();
        testNum = in.readString();
        time = in.readString();
        testPoint = in.readString();
        displacementN = in.readFloat();
        displacementE = in.readFloat();
        isDelete = in.readInt();
        createTime = in.readString();
    }

    public static final Creator<DisplacementBean> CREATOR = new Creator<DisplacementBean>() {
        @Override
        public DisplacementBean createFromParcel(Parcel in) {
            return new DisplacementBean(in);
        }

        @Override
        public DisplacementBean[] newArray(int size) {
            return new DisplacementBean[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMonitorCode() {
        return monitorCode;
    }

    public void setMonitorCode(String monitorCode) {
        this.monitorCode = monitorCode;
    }

    public String getTestNum() {
        return testNum;
    }

    public void setTestNum(String testNum) {
        this.testNum = testNum;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getTestPoint() {
        return testPoint;
    }

    public void setTestPoint(String testPoint) {
        this.testPoint = testPoint;
    }

    public float getDisplacementN() {
        return displacementN;
    }

    public String getDisplacementESrc() {
        return displacementE + "mm";
    }

    public String getDisplacementNSrc() {
        return displacementN + "mm";
    }

    public void setDisplacementN(float displacementN) {
        this.displacementN = displacementN;
    }

    public Object getVerticalSectionName() {
        return verticalSectionName;
    }

    public void setVerticalSectionName(Object verticalSectionName) {
        this.verticalSectionName = verticalSectionName;
    }

    public Object getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(Object projectCode) {
        this.projectCode = projectCode;
    }

    public float getDisplacementE() {
        return displacementE;
    }

    public void setDisplacementE(float displacementE) {
        this.displacementE = displacementE;
    }

    public Object getHorizontalSectionName() {
        return horizontalSectionName;
    }

    public void setHorizontalSectionName(Object horizontalSectionName) {
        this.horizontalSectionName = horizontalSectionName;
    }

    public float getDisplacement() {
        return displacement;
    }

    public String getDisplacementSrc() {
        return getDisplacement()+"mm";
    }

    public void setDisplacement(float displacement) {
        this.displacement = displacement;
    }

    public int getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(int isDelete) {
        this.isDelete = isDelete;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Object getSectionName() {
        return sectionName;
    }

    public void setSectionName(Object sectionName) {
        this.sectionName = sectionName;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(monitorCode);
        dest.writeString(testNum);
        dest.writeString(time);
        dest.writeString(testPoint);
        dest.writeFloat(displacementN);
        dest.writeFloat(displacementE);
        dest.writeInt(isDelete);
        dest.writeString(createTime);
    }

    public List<DisplacementBean> getBeanList() {
        return beanList;
    }

    public void setBeanList(List<DisplacementBean> beanList) {
        this.beanList = beanList;
    }
}
